package com.xiaofan.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.concurrent.Executors;

/**
 * @author: 晓帆
 * @description:
 * @create: 2021-06-29 20:18
 **/
@Aspect
@Component
public class CustomAspect {
    @Pointcut("execution(* com.xiaofan.service.UserServiceIpm.update(..))")
    public void pointCut(){
    }
    @Around("pointCut()")
    public Object around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        System.out.println("hello");
        Object proceed = proceedingJoinPoint.proceed();
        System.out.println("world");
        return proceed;
    }
}
